







Namespace: Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
C# |
---|
[SerializableAttribute] public class OrderedSet<T> : CollectionBase<T>, ICollection<T>, IEnumerable<T>, IEnumerable, ICloneable |
Visual Basic (Declaration) |
---|
<SerializableAttribute> _ Public Class OrderedSet(Of T) _ Inherits CollectionBase(Of T) _ Implements ICollection(Of T), IEnumerable(Of T), _ IEnumerable, ICloneable |
Visual C++ |
---|
[SerializableAttribute] generic<typename T> public ref class OrderedSet : public CollectionBase<T>, ICollection<T>, IEnumerable<T>, IEnumerable, ICloneable |
Type Parameters
- T
Remarks
The items are compared in one of three ways. If T implements IComparable<TKey> or IComparable, then the CompareTo method of that interface will be used to compare items. Alternatively, a comparison function can be passed in either as a delegate, or as an instance of IComparer<TKey>.
OrderedSet is implemented as a balanced binary tree. Inserting, deleting, and looking up an an element all are done in log(N) type, where N is the number of keys in the tree.
Set<(Of <T>)> is similar, but uses hashing instead of comparison, and does not maintain the items in sorted order.
Inheritance Hierarchy
Wintellect.PowerCollections..::CollectionBase<(Of <T>)>
Wintellect.PowerCollections..::OrderedSet<(Of <T>)>